const {app,BrowserWindow} = require('electron')
const path = require('path')
let mainWindow
function createWindow() {
    mainWindow = new BrowserWindow({
        width: 1000,
        height: 680,
        webPreferences: {
            nodeIntegration: true,
            contextIsolation:false

        }
    })
    mainWindow.loadFile(path.resolve(__dirname, '../../app/renderer/pages/screen/index.html'))
    // 打开开发工具
   mainWindow.webContents.openDevTools()
}
app.whenReady().then(() => {
    createWindow()
    app.on('activate', function () {
        if (BrowserWindow.getAllWindows().length === 0) createWindow()
      })
      app.on('window-all-closed', function () {
        if (process.platform !== 'darwin') app.quit()
      }) 
  })



